home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 123
/
(Vol 123) Jan 13 2011.iso
/
Games
/
Rings.swf
/
scripts
/
__Packages
/
mx
/
transitions
/
Tween.as
< prev
Wrap
Text File
|
2011-01-13
|
17KB
|
503 lines
var §\x01§ = 264;
while(true)
{
if(eval("\x01") == 264)
{
set("\x01",eval("\x01") + 289);
§§push(true);
}
else
{
if(eval("\x01") == 765)
{
set("\x01",eval("\x01") - 763);
break;
}
if(eval("\x01") == 458)
{
set("\x01",eval("\x01") - 307);
§§push(§§pop() / §§pop());
break;
}
if(eval("\x01") == 553)
{
set("\x01",eval("\x01") - 455);
if(§§pop())
{
set("\x01",eval("\x01") + 80);
}
}
else
{
if(eval("\x01") == 217)
{
set("\x01",eval("\x01") + 524);
if(!_global.mx)
{
_global.mx = new Object();
}
§§pop();
if(!_global.mx.transitions)
{
_global.mx.transitions = new Object();
}
§§pop();
if(!_global.mx.transitions.Tween)
{
var _loc2_ = mx.transitions.Tween = function(obj, prop, func, begin, finish, duration, useSeconds)
{
mx.transitions.OnEnterFrameBeacon.init();
if(!arguments.length)
{
return undefined;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
this.__set__position(begin);
this.__set__duration(duration);
this.useSeconds = useSeconds;
if(func)
{
this.func = func;
}
this.__set__finish(finish);
this._listeners = [];
this.addListener(this);
this.start();
}.prototype;
_loc2_.__set__time = function(t)
{
this.prevTime = this._time;
if(t > this.__get__duration())
{
if(this.looping)
{
this.rewind(t - this._duration);
this.update();
this.broadcastMessage("onMotionLooped",this);
}
else
{
if(this.useSeconds)
{
this._time = this._duration;
this.update();
}
this.stop();
this.broadcastMessage("onMotionFinished",this);
}
}
else if(t < 0)
{
this.rewind();
this.update();
}
else
{
this._time = t;
this.update();
}
return this.__get__time();
};
_loc2_.__get__time = function()
{
return this._time;
};
_loc2_.__set__duration = function(d)
{
this._duration = !(d == null || d <= 0) ? d : _global.Infinity;
return this.__get__duration();
};
_loc2_.__get__duration = function()
{
return this._duration;
};
_loc2_.__set__FPS = function(fps)
{
var _loc2_ = this.isPlaying;
this.stopEnterFrame();
this._fps = fps;
if(_loc2_)
{
this.startEnterFrame();
}
return this.__get__FPS();
};
_loc2_.__get__FPS = function()
{
return this._fps;
};
_loc2_.__set__position = function(p)
{
this.setPosition(p);
return this.__get__position();
};
_loc2_.setPosition = function(p)
{
this.prevPos = this._pos;
this.obj[this.prop] = this._pos = p;
this.broadcastMessage("onMotionChanged",this,this._pos);
updateAfterEvent();
};
_loc2_.__get__position = function()
{
return this.getPosition();
};
_loc2_.getPosition = function(t)
{
if(t == undefined)
{
t = this._time;
}
return this.func(t,this.begin,this.change,this._duration);
};
_loc2_.__set__finish = function(f)
{
this.change = f - this.begin;
return this.__get__finish();
};
_loc2_.__get__finish = function()
{
return this.begin + this.change;
};
_loc2_.continueTo = function(finish, duration)
{
this.begin = this.position;
this.__set__finish(finish);
if(duration != undefined)
{
this.__set__duration(duration);
}
this.start();
};
_loc2_.yoyo = function()
{
this.continueTo(this.begin,this.__get__time());
};
_loc2_.startEnterFrame = function()
{
if(this._fps == undefined)
{
_global.MovieClip.addListener(this);
}
else
{
this._intervalID = setInterval(this,"onEnterFrame",1000 / this._fps);
}
this.isPlaying = true;
};
_loc2_.stopEnterFrame = function()
{
if(this._fps == undefined)
{
_global.MovieClip.removeListener(this);
}
else
{
clearInterval(this._intervalID);
}
this.isPlaying = false;
};
_loc2_.start = function()
{
this.rewind();
this.startEnterFrame();
this.broadcastMessage("onMotionStarted",this);
};
_loc2_.stop = function()
{
this.stopEnterFrame();
this.broadcastMessage("onMotionStopped",this);
};
_loc2_.resume = function()
{
this.fixTime();
this.startEnterFrame();
this.broadcastMessage("onMotionResumed",this);
};
_loc2_.rewind = function(t)
{
this._time = t != undefined ? t : 0;
this.fixTime();
this.update();
};
_loc2_.fforward = function()
{
this.__set__time(this._duration);
this.fixTime();
};
_loc2_.nextFrame = function()
{
if(this.useSeconds)
{
this.__set__time((getTimer() - this._startTime) / 1000);
}
else
{
this.__set__time(this._time + 1);
}
};
_loc2_.onEnterFrame = function()
{
this.nextFrame();
};
_loc2_.prevFrame = function()
{
if(!this.useSeconds)
{
this.__set__time(this._time - 1);
}
};
_loc2_.toString = function()
{
return "[Tween]";
};
_loc2_.fixTime = function()
{
if(this.useSeconds)
{
this._startTime = getTimer() - this._time * 1000;
}
};
_loc2_.update = function()
{
this.__set__position(this.getPosition(this._time));
};
mx.transitions.Tween = function(obj, prop, func, begin, finish, duration, useSeconds)
{
mx.transitions.OnEnterFrameBeacon.init();
if(!arguments.length)
{
return undefined;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
this.__set__position(begin);
this.__set__duration(duration);
this.useSeconds = useSeconds;
if(func)
{
this.func = func;
}
this.__set__finish(finish);
this._listeners = [];
this.addListener(this);
this.start();
}.version = "1.1.0.52";
mx.transitions.Tween = function(obj, prop, func, begin, finish, duration, useSeconds)
{
mx.transitions.OnEnterFrameBeacon.init();
if(!arguments.length)
{
return undefined;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
this.__set__position(begin);
this.__set__duration(duration);
this.useSeconds = useSeconds;
if(func)
{
this.func = func;
}
this.__set__finish(finish);
this._listeners = [];
this.addListener(this);
this.start();
}.__initBeacon = mx.transitions.OnEnterFrameBeacon.init();
mx.transitions.Tween = function(obj, prop, func, begin, finish, duration, useSeconds)
{
mx.transitions.OnEnterFrameBeacon.init();
if(!arguments.length)
{
return undefined;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
this.__set__position(begin);
this.__set__duration(duration);
this.useSeconds = useSeconds;
if(func)
{
this.func = func;
}
this.__set__finish(finish);
this._listeners = [];
this.addListener(this);
this.start();
}.__initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype,true);
_loc2_.func = function(t, b, c, d)
{
return c * t / d + b;
};
§§push(_loc2_.addProperty("FPS",_loc2_.__get__FPS,_loc2_.__set__FPS));
§§push(_loc2_.addProperty("duration",_loc2_.__get__duration,_loc2_.__set__duration));
§§push(_loc2_.addProperty("finish",_loc2_.__get__finish,_loc2_.__set__finish));
§§push(_loc2_.addProperty("position",_loc2_.__get__position,_loc2_.__set__position));
§§push(_loc2_.addProperty("time",_loc2_.__get__time,_loc2_.__set__time));
§§push(ASSetPropFlags(mx.transitions.Tween.prototype,null,1));
}
§§pop();
break;
}
if(eval("\x01") == 884)
{
set("\x01",eval("\x01") - 491);
if(§§pop())
{
set("\x01",eval("\x01") + 504);
}
}
else
{
if(eval("\x01") == 98)
{
set("\x01",eval("\x01") + 80);
stop();
with(§§pop())
{
}
§§pop() extends §§pop();
§§pop() extends §§pop() | §§pop();
§§push(§§pop() >>> §§pop());
break;
}
if(eval("\x01") == 627)
{
set("\x01",eval("\x01") - 129);
if(§§pop())
{
set("\x01",eval("\x01") + 112);
}
}
else
{
if(eval("\x01") == 158)
{
set("\x01",eval("\x01") + 157);
stopAllSounds();
break;
}
if(eval("\x01") == 178)
{
set("\x01",eval("\x01") + 681);
§§push(true);
}
else if(eval("\x01") == 346)
{
set("\x01",eval("\x01") - 188);
if(§§pop())
{
set("\x01",eval("\x01") + 157);
}
}
else if(eval("\x01") == 196)
{
set("\x01",eval("\x01") + 569);
if(§§pop())
{
set("\x01",eval("\x01") - 763);
}
}
else if(eval("\x01") == 2)
{
set("\x01",eval("\x01") + 625);
§§push(true);
}
else
{
if(eval("\x01") == 428)
{
set("\x01",eval("\x01") - 221);
break;
}
if(eval("\x01") == 983)
{
set("\x01",eval("\x01") - 766);
break;
}
if(eval("\x01") == 897)
{
set("\x01",eval("\x01") - 701);
§§push(true);
}
else if(eval("\x01") == 859)
{
set("\x01",eval("\x01") - 431);
if(§§pop())
{
set("\x01",eval("\x01") - 221);
}
}
else if(eval("\x01") == 537)
{
set("\x01",eval("\x01") - 79);
if(§§pop())
{
set("\x01",eval("\x01") - 307);
}
}
else
{
if(eval("\x01") == 498)
{
set("\x01",eval("\x01") + 112);
break;
}
if(eval("\x01") == 207)
{
set("\x01",eval("\x01") + 330);
§§push(true);
}
else if(eval("\x01") == 151)
{
set("\x01",eval("\x01") + 733);
§§push(true);
}
else if(eval("\x01") == 610)
{
set("\x01",eval("\x01") - 264);
§§push(true);
}
else
{
if(eval("\x01") == 393)
{
set("\x01",eval("\x01") + 504);
break;
}
if(eval("\x01") == 315)
{
set("\x01",eval("\x01") - 271);
§§push(true);
}
else
{
if(eval("\x01") == 741)
{
set("\x01",eval("\x01") - 741);
break;
}
if(eval("\x01") != 44)
{
break;
}
set("\x01",eval("\x01") + 939);
if(§§pop())
{
set("\x01",eval("\x01") - 766);
}
}
}
}
}
}
}
}
}
}